package cc.openhome;

/**
 * Created by LJY on 2017/3/30.
 */

import static java.lang.System.out;
public class TortoiseHareRace {
    public static void main(String[] args) {
        boolean[] flags={true,false};
        int totalStep=10;
        int tortoiseStep=0;
        int HareStep=0;
        out.println("龟兔赛跑开始...");
        while (tortoiseStep<totalStep && HareStep<totalStep){
            tortoiseStep++;
            out.printf("乌龟跑了%d步%n",tortoiseStep);
            boolean isHareSleep=flags[((int) (Math.random()*10))%2];
        }
    }
}
